package org.jxf.gps.jfinal.model;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

public class GPSTerminal extends Model<GPSTerminal> {
	/**
	 * 获取设备所在group的id和path
	 * @param mdn
	 * @return
	 */
	public static Record getVehicleInfoByMdn(String mdn){
		return Db.findFirst("select b.plateNum,b.groupId,b.groupId groupPath "
				+ "from gpsterminal a,vehicle b "
				+ "where a.id = b.terminalId and a.mdn=?",mdn);
	}

}
